View | Details | Raw Unified | Return to bug 230478
Collapse All | Expand All

(-)a/ChangeLog (+8 lines)
Lines 1-3 Link Here
1
2007-12-19  Federico Mena Quintero  <federico@novell.com>
2
3
	* main-menu/src/main-menu-ui.c (page_button_toggled_cb): Renamed
4
	from page_button_clicked_cb.  See if the button is actually
5
	active, to avoid switching pages twice every time one of the page
6
	selectors is clicked.
7
	(create_file_section): Connect to "toggled" on the page selector buttons.
8
1
2007-12-17  Federico Mena Quintero  <federico@novell.com>
9
2007-12-17  Federico Mena Quintero  <federico@novell.com>
2
10
3
	* main-menu/src/main-menu-ui.c (panel_button_clicked_cb): Use GTK+
11
	* main-menu/src/main-menu-ui.c (panel_button_clicked_cb): Use GTK+
(-)a/libslab/document-tile.c (+18 lines)
Lines 108-113 static void document_tile_class_init (DocumentTileClass *this_class) Link Here
108
	g_type_class_add_private (this_class, sizeof (DocumentTilePrivate));
108
	g_type_class_add_private (this_class, sizeof (DocumentTilePrivate));
109
}
109
}
110
110
111
static void
112
show_cb (GtkWidget *widget, gpointer data)
113
{
114
	DocumentTile *tile;
115
116
	tile = DOCUMENT_TILE (widget);
117
118
	printf ("Tile for %s shown\n", TILE (tile)->uri);
119
}
120
111
GtkWidget *
121
GtkWidget *
112
document_tile_new (const gchar *in_uri, const gchar *mime_type, time_t modified)
122
document_tile_new (const gchar *in_uri, const gchar *mime_type, time_t modified)
113
{
123
{
Lines 164-169 document_tile_new (const gchar *in_uri, const gchar *mime_type, time_t modified) Link Here
164
		"nameplate-header", header, "nameplate-subheader", subheader, 
174
		"nameplate-header", header, "nameplate-subheader", subheader, 
165
		"nameplate-tooltip", tooltip_text, "context-menu", context_menu, NULL);
175
		"nameplate-tooltip", tooltip_text, "context-menu", context_menu, NULL);
166
176
177
	g_signal_connect (this, "show",
178
			  G_CALLBACK (show_cb), NULL);
179
167
	g_free (uri);
180
	g_free (uri);
168
	if (tooltip_text)
181
	if (tooltip_text)
169
		g_free (tooltip_text);
182
		g_free (tooltip_text);
Lines 415-420 load_image (DocumentTile *tile) Link Here
415
428
416
	gchar *icon_id = NULL;
429
	gchar *icon_id = NULL;
417
	gboolean free_icon_id = TRUE;
430
	gboolean free_icon_id = TRUE;
431
	const char *uri;
418
432
419
	if (! priv->mime_type || ! strstr (TILE (tile)->uri, "file://")) {
433
	if (! priv->mime_type || ! strstr (TILE (tile)->uri, "file://")) {
420
		icon_id = "gnome-fs-regular";
434
		icon_id = "gnome-fs-regular";
Lines 426-431 load_image (DocumentTile *tile) Link Here
426
	if (! thumbnail_factory)
440
	if (! thumbnail_factory)
427
		thumbnail_factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
441
		thumbnail_factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
428
442
443
	uri = TILE (tile)->uri;
444
429
	thumb_path = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
445
	thumb_path = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
430
446
431
	if (!thumb_path) {
447
	if (!thumb_path) {
Lines 433-438 load_image (DocumentTile *tile) Link Here
433
			gnome_thumbnail_factory_can_thumbnail (
449
			gnome_thumbnail_factory_can_thumbnail (
434
				thumbnail_factory, TILE (tile)->uri, priv->mime_type, priv->modified)
450
				thumbnail_factory, TILE (tile)->uri, priv->mime_type, priv->modified)
435
		) {
451
		) {
452
			printf ("THUMBNAILING %s\n", uri);
436
			thumb = gnome_thumbnail_factory_generate_thumbnail (
453
			thumb = gnome_thumbnail_factory_generate_thumbnail (
437
				thumbnail_factory, TILE (tile)->uri, priv->mime_type);
454
				thumbnail_factory, TILE (tile)->uri, priv->mime_type);
438
455
Lines 460-465 load_image (DocumentTile *tile) Link Here
460
477
461
exit:
478
exit:
462
479
480
	printf ("Loading image thumbnail for %s\n", uri);
463
	priv->image_is_broken = slab_load_image (
481
	priv->image_is_broken = slab_load_image (
464
		GTK_IMAGE (NAMEPLATE_TILE (tile)->image), GTK_ICON_SIZE_DND, icon_id);
482
		GTK_IMAGE (NAMEPLATE_TILE (tile)->image), GTK_ICON_SIZE_DND, icon_id);
465
483
(-)a/main-menu/src/main-menu-ui.c (-6 / +6 lines)
Lines 193-199 static void slab_window_map_event_cb (GtkWidget *, GdkEvent *, gpoi Link Here
193
static void     slab_window_unmap_event_cb        (GtkWidget *, GdkEvent *, gpointer);
193
static void     slab_window_unmap_event_cb        (GtkWidget *, GdkEvent *, gpointer);
194
static gboolean slab_window_grab_broken_cb        (GtkWidget *, GdkEvent *, gpointer);
194
static gboolean slab_window_grab_broken_cb        (GtkWidget *, GdkEvent *, gpointer);
195
static void     search_entry_activate_cb          (GtkEntry *, gpointer);
195
static void     search_entry_activate_cb          (GtkEntry *, gpointer);
196
static void     page_button_clicked_cb            (GtkButton *, gpointer);
196
static void     page_button_toggled_cb            (GtkToggleButton *, gpointer);
197
static void     tile_table_notify_cb              (GObject *, GParamSpec *, gpointer);
197
static void     tile_table_notify_cb              (GObject *, GParamSpec *, gpointer);
198
static void     gtk_table_notify_cb               (GObject *, GParamSpec *, gpointer);
198
static void     gtk_table_notify_cb               (GObject *, GParamSpec *, gpointer);
199
static void     tile_action_triggered_cb          (Tile *, TileEvent *, TileAction *, gpointer);
199
static void     tile_action_triggered_cb          (Tile *, TileEvent *, TileAction *, gpointer);
Lines 623-630 create_file_section (MainMenuUI *this) Link Here
623
			G_OBJECT (priv->page_selectors [i]), "page-type", GINT_TO_POINTER (i));
623
			G_OBJECT (priv->page_selectors [i]), "page-type", GINT_TO_POINTER (i));
624
624
625
		g_signal_connect (
625
		g_signal_connect (
626
			G_OBJECT (priv->page_selectors [i]), "clicked",
626
			G_OBJECT (priv->page_selectors [i]), "toggled",
627
			G_CALLBACK (page_button_clicked_cb), this);
627
			G_CALLBACK (page_button_toggled_cb), this);
628
	}
628
	}
629
629
630
	priv->current_page_gconf_mntr_id = libslab_gconf_notify_add (
630
	priv->current_page_gconf_mntr_id = libslab_gconf_notify_add (
Lines 1974-1985 search_entry_activate_cb (GtkEntry *entry, gpointer user_data) Link Here
1974
}
1974
}
1975
1975
1976
static void
1976
static void
1977
page_button_clicked_cb (GtkButton *button, gpointer user_data)
1977
page_button_toggled_cb (GtkToggleButton *button, gpointer user_data)
1978
{
1978
{
1979
	MainMenuUIPrivate *priv = PRIVATE (user_data);
1979
	MainMenuUIPrivate *priv = PRIVATE (user_data);
1980
1981
	gint page_type;
1980
	gint page_type;
1982
1981
1982
	if (!gtk_toggle_button_get_active (button))
1983
		return;
1983
1984
1984
	page_type = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "page-type"));
1985
	page_type = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "page-type"));
1985
1986
1986
- 

Return to bug 230478