applied jamesa-971010-0 for stability. applied jamesa-971010-2 for a small
* gtkfilesel.c: applied jamesa-971010-0 for stability.
        * gtkrc.c: applied jamesa-971010-2 for a small optimization.
        * gtkcheckmenuitem.h:
        * gtkcheckmenuitem.c:
        * gtkradiomenuitem.c:
        * testgtk.c: applied johannes-971113-0 which adds
        gtk_check_menu_item_set_show_toggle() to change the way check
        menu items and radio menu items look.
-timj
			
			
This commit is contained in:
		
							
								
								
									
										11
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								ChangeLog
									
									
									
									
									
								
							@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,14 @@
 | 
			
		||||
Sun Dec  7 03:19:02 1997  Tim Janik  <timj@psynet.net>
 | 
			
		||||
 | 
			
		||||
	* gtkfilesel.c: applied jamesa-971010-0 for stability.
 | 
			
		||||
	* gtkrc.c: applied jamesa-971010-2 for a small optimization.
 | 
			
		||||
	* gtkcheckmenuitem.h:
 | 
			
		||||
	* gtkcheckmenuitem.c:
 | 
			
		||||
	* gtkradiomenuitem.c:
 | 
			
		||||
	* testgtk.c: applied johannes-971113-0 which adds
 | 
			
		||||
 	gtk_check_menu_item_set_show_toggle() to change the way check
 | 
			
		||||
 	menu items and radio menu items look.
 | 
			
		||||
 | 
			
		||||
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
 | 
			
		||||
	* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
 | 
			
		||||
	printing, DnD is Bug Free now, etc.
 | 
			
		||||
 | 
			
		||||
@ -102,13 +102,22 @@ gtk_check_menu_item_set_state (GtkCheckMenuItem *check_menu_item,
 | 
			
		||||
    gtk_menu_item_activate (GTK_MENU_ITEM (check_menu_item));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
gtk_check_menu_item_set_show_toggle (GtkCheckMenuItem *menu_item,
 | 
			
		||||
				     gboolean          always)
 | 
			
		||||
{
 | 
			
		||||
  g_return_if_fail (menu_item != NULL);
 | 
			
		||||
  g_return_if_fail (GTK_IS_CHECK_MENU_ITEM (menu_item));
 | 
			
		||||
  
 | 
			
		||||
  menu_item->always_show_toggle = always != FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item)
 | 
			
		||||
{
 | 
			
		||||
  gtk_signal_emit (GTK_OBJECT (check_menu_item), check_menu_item_signals[TOGGLED]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
 | 
			
		||||
{
 | 
			
		||||
@ -146,6 +155,7 @@ static void
 | 
			
		||||
gtk_check_menu_item_init (GtkCheckMenuItem *check_menu_item)
 | 
			
		||||
{
 | 
			
		||||
  check_menu_item->active = FALSE;
 | 
			
		||||
  check_menu_item->always_show_toggle = FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@ -231,13 +241,24 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
 | 
			
		||||
      gdk_window_clear_area (widget->window, x, y, width, height);
 | 
			
		||||
 | 
			
		||||
      if (check_menu_item->active ||
 | 
			
		||||
	  check_menu_item->always_show_toggle ||
 | 
			
		||||
	  (GTK_WIDGET_STATE (check_menu_item) == GTK_STATE_PRELIGHT))
 | 
			
		||||
	{
 | 
			
		||||
	  state_type = GTK_WIDGET_STATE (widget);
 | 
			
		||||
	  
 | 
			
		||||
	  shadow_type = GTK_SHADOW_IN;
 | 
			
		||||
	  if (check_menu_item->active && (state_type == GTK_STATE_PRELIGHT))
 | 
			
		||||
	  if (check_menu_item->always_show_toggle)
 | 
			
		||||
	    {
 | 
			
		||||
	      shadow_type = GTK_SHADOW_OUT;
 | 
			
		||||
	      if (check_menu_item->active)
 | 
			
		||||
		shadow_type = GTK_SHADOW_IN;
 | 
			
		||||
	    }
 | 
			
		||||
	  else
 | 
			
		||||
	    {
 | 
			
		||||
	      shadow_type = GTK_SHADOW_IN;
 | 
			
		||||
	      if (check_menu_item->active &&
 | 
			
		||||
		  (state_type == GTK_STATE_PRELIGHT))
 | 
			
		||||
		shadow_type = GTK_SHADOW_OUT;
 | 
			
		||||
	    }
 | 
			
		||||
	  
 | 
			
		||||
	  gdk_draw_rectangle (widget->window,
 | 
			
		||||
			      widget->style->bg_gc[state_type],
 | 
			
		||||
 | 
			
		||||
@ -41,6 +41,7 @@ struct _GtkCheckMenuItem
 | 
			
		||||
  GtkMenuItem menu_item;
 | 
			
		||||
 | 
			
		||||
  guint active : 1;
 | 
			
		||||
  guint always_show_toggle : 1;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct _GtkCheckMenuItemClass
 | 
			
		||||
@ -58,6 +59,8 @@ GtkWidget* gtk_check_menu_item_new            (void);
 | 
			
		||||
GtkWidget* gtk_check_menu_item_new_with_label (const gchar      *label);
 | 
			
		||||
void       gtk_check_menu_item_set_state      (GtkCheckMenuItem *check_menu_item,
 | 
			
		||||
					       gint              state);
 | 
			
		||||
void	   gtk_check_menu_item_set_show_toggle(GtkCheckMenuItem *menu_item,
 | 
			
		||||
					       gboolean          always);
 | 
			
		||||
void       gtk_check_menu_item_toggled        (GtkCheckMenuItem *check_menu_item);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1180,6 +1180,7 @@ prune_memory_usage(CompletionState *cmpl_state)
 | 
			
		||||
    cdsl->next = NULL;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  cmpl_state->directory_storage = NULL;
 | 
			
		||||
  while (cdl) {
 | 
			
		||||
    if (cdl->data == cmpl_state->reference_dir)
 | 
			
		||||
      cmpl_state->directory_storage = g_list_prepend(NULL, cdl->data);
 | 
			
		||||
@ -1577,7 +1578,7 @@ correct_dir_fullname(CompletionDir* cmpl_dir)
 | 
			
		||||
	  return FALSE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      cmpl_dir->fullname[length - 3] = 0;
 | 
			
		||||
      cmpl_dir->fullname[length - 2] = 0;
 | 
			
		||||
 | 
			
		||||
      if(!correct_parent(cmpl_dir, &sbuf))
 | 
			
		||||
	return FALSE;
 | 
			
		||||
@ -1597,7 +1598,7 @@ correct_dir_fullname(CompletionDir* cmpl_dir)
 | 
			
		||||
	  return FALSE;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      cmpl_dir->fullname[length - 4] = 0;
 | 
			
		||||
      cmpl_dir->fullname[length - 3] = 0;
 | 
			
		||||
 | 
			
		||||
      if(!correct_parent(cmpl_dir, &sbuf))
 | 
			
		||||
	return FALSE;
 | 
			
		||||
@ -1621,7 +1622,7 @@ correct_parent(CompletionDir* cmpl_dir, struct stat *sbuf)
 | 
			
		||||
  g_assert(last_slash);
 | 
			
		||||
 | 
			
		||||
  if(last_slash != cmpl_dir->fullname)
 | 
			
		||||
    last_slash[0] = 0;
 | 
			
		||||
    { /* last_slash[0] = 0; */ }
 | 
			
		||||
  else
 | 
			
		||||
    {
 | 
			
		||||
      c = last_slash[1];
 | 
			
		||||
@ -1640,8 +1641,8 @@ correct_parent(CompletionDir* cmpl_dir, struct stat *sbuf)
 | 
			
		||||
 | 
			
		||||
  if(c)
 | 
			
		||||
    last_slash[1] = c;
 | 
			
		||||
  else
 | 
			
		||||
    last_slash[0] = '/';
 | 
			
		||||
  /* else
 | 
			
		||||
    last_slash[0] = '/'; */
 | 
			
		||||
 | 
			
		||||
  /* it was a link, have to figure it out the hard way */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -215,10 +215,15 @@ gtk_radio_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
 | 
			
		||||
      gdk_window_clear_area (widget->window, x, y, width, height);
 | 
			
		||||
 | 
			
		||||
      if (check_menu_item->active ||
 | 
			
		||||
	  check_menu_item->always_show_toggle ||
 | 
			
		||||
	  (GTK_WIDGET_STATE (check_menu_item) == GTK_STATE_PRELIGHT))
 | 
			
		||||
	{
 | 
			
		||||
	  state_type = GTK_WIDGET_STATE (widget);
 | 
			
		||||
	  if (check_menu_item->active ||
 | 
			
		||||
	      !check_menu_item->always_show_toggle)
 | 
			
		||||
	    shadow_type = GTK_SHADOW_IN;
 | 
			
		||||
	  else
 | 
			
		||||
	    shadow_type = GTK_SHADOW_OUT;
 | 
			
		||||
 | 
			
		||||
	  pts[0].x = x + width / 2;
 | 
			
		||||
	  pts[0].y = y;
 | 
			
		||||
 | 
			
		||||
@ -1257,7 +1257,8 @@ gtk_rc_parse_pixmap_path ()
 | 
			
		||||
  return PARSE_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void gtk_rc_parse_pixmap_path_string(gchar *pix_path)
 | 
			
		||||
static void
 | 
			
		||||
gtk_rc_parse_pixmap_path_string (gchar *pix_path)
 | 
			
		||||
{
 | 
			
		||||
  gchar *buf;
 | 
			
		||||
  gint end_offset;
 | 
			
		||||
@ -1280,15 +1281,14 @@ static void gtk_rc_parse_pixmap_path_string(gchar *pix_path)
 | 
			
		||||
 | 
			
		||||
  for (end_offset = 0; end_offset <= path_len; end_offset++)
 | 
			
		||||
    {
 | 
			
		||||
      if ( (buf[end_offset] == ':') || (end_offset == path_len) )
 | 
			
		||||
      if ((buf[end_offset] == ':') ||
 | 
			
		||||
	  (end_offset == path_len))
 | 
			
		||||
	{
 | 
			
		||||
	  buf[end_offset] = '\0';
 | 
			
		||||
	  pixmap_path[path_num] = g_strdup (buf + start_offset);
 | 
			
		||||
	  path_num++;
 | 
			
		||||
	  pixmap_path[path_num] = NULL;
 | 
			
		||||
	  start_offset = end_offset + 1;
 | 
			
		||||
	  g_free(buf);
 | 
			
		||||
	  buf = g_strdup(pix_path);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
  g_free (buf);
 | 
			
		||||
 | 
			
		||||
@ -859,6 +859,8 @@ create_menu (int depth)
 | 
			
		||||
      sprintf (buf, "item %2d - %d", depth, j);
 | 
			
		||||
      menuitem = gtk_radio_menu_item_new_with_label (group, buf);
 | 
			
		||||
      group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
 | 
			
		||||
      if (depth % 2)
 | 
			
		||||
	gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
 | 
			
		||||
      gtk_menu_append (GTK_MENU (menu), menuitem);
 | 
			
		||||
      gtk_widget_show (menuitem);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -859,6 +859,8 @@ create_menu (int depth)
 | 
			
		||||
      sprintf (buf, "item %2d - %d", depth, j);
 | 
			
		||||
      menuitem = gtk_radio_menu_item_new_with_label (group, buf);
 | 
			
		||||
      group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
 | 
			
		||||
      if (depth % 2)
 | 
			
		||||
	gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
 | 
			
		||||
      gtk_menu_append (GTK_MENU (menu), menuitem);
 | 
			
		||||
      gtk_widget_show (menuitem);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user