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

(-)a/libslab/bookmark-agent.c (+8 lines)
Lines 1061-1068 create_app_item (BookmarkAgent *this, const gchar *uri) Link Here
1061
	else if (! libslab_strcmp (name, "Shutdown"))
1061
	else if (! libslab_strcmp (name, "Shutdown"))
1062
		g_bookmark_file_set_title (priv->store, uri, _("Shutdown"));
1062
		g_bookmark_file_set_title (priv->store, uri, _("Shutdown"));
1063
1063
1064
	g_free (name);
1065
1064
	if (libslab_strcmp (uri, uri_new))
1066
	if (libslab_strcmp (uri, uri_new))
1065
		g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
1067
		g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
1068
1069
	g_free (uri_new);
1066
}
1070
}
1067
1071
1068
static void
1072
static void
Lines 1121-1126 create_doc_item (BookmarkAgent *this, const gchar *uri) Link Here
1121
1125
1122
	if (libslab_strcmp (uri, uri_new))
1126
	if (libslab_strcmp (uri, uri_new))
1123
		g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
1127
		g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
1128
1129
	g_free (uri_new);
1124
}
1130
}
1125
1131
1126
static void
1132
static void
Lines 1204-1209 create_dir_item (BookmarkAgent *this, const gchar *uri) Link Here
1204
	
1210
	
1205
	if (uri_new && libslab_strcmp (uri, uri_new))
1211
	if (uri_new && libslab_strcmp (uri, uri_new))
1206
		g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
1212
		g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
1213
1214
	g_free (uri_new);
1207
}
1215
}
1208
1216
1209
static void
1217
static void
(-)a/libslab/nameplate-tile.c (-16 / +11 lines)
Lines 36-42 typedef struct Link Here
36
	GtkContainer *image_ctnr;
36
	GtkContainer *image_ctnr;
37
	GtkContainer *header_ctnr;
37
	GtkContainer *header_ctnr;
38
	GtkContainer *subheader_ctnr;
38
	GtkContainer *subheader_ctnr;
39
	GtkTooltips  *tooltips;
40
} NameplateTilePrivate;
39
} NameplateTilePrivate;
41
40
42
#define NAMEPLATE_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NAMEPLATE_TILE_TYPE, NameplateTilePrivate))
41
#define NAMEPLATE_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NAMEPLATE_TILE_TYPE, NameplateTilePrivate))
Lines 100-106 nameplate_tile_class_init (NameplateTileClass * this_class) Link Here
100
static void
99
static void
101
nameplate_tile_init (NameplateTile * this)
100
nameplate_tile_init (NameplateTile * this)
102
{
101
{
103
	NAMEPLATE_TILE_GET_PRIVATE (this)->tooltips = NULL;
104
}
102
}
105
103
106
static GObject *
104
static GObject *
Lines 117-122 nameplate_tile_constructor (GType type, guint n_param, GObjectConstructParam * p Link Here
117
static void
115
static void
118
nameplate_tile_finalize (GObject * g_object)
116
nameplate_tile_finalize (GObject * g_object)
119
{
117
{
118
	NameplateTile *np_tile;
119
	NameplateTilePrivate *priv;
120
121
	np_tile = NAMEPLATE_TILE (g_object);
122
	priv = NAMEPLATE_TILE_GET_PRIVATE (np_tile);
123
120
	(*G_OBJECT_CLASS (nameplate_tile_parent_class)->finalize) (g_object);
124
	(*G_OBJECT_CLASS (nameplate_tile_parent_class)->finalize) (g_object);
121
}
125
}
122
126
Lines 124-130 static void Link Here
124
nameplate_tile_get_property (GObject * g_object, guint prop_id, GValue * value,
128
nameplate_tile_get_property (GObject * g_object, guint prop_id, GValue * value,
125
	GParamSpec * param_spec)
129
	GParamSpec * param_spec)
126
{
130
{
127
	GtkTooltipsData *tooltip;
131
	char *tooltip;
128
	NameplateTile *np_tile = NAMEPLATE_TILE (g_object);
132
	NameplateTile *np_tile = NAMEPLATE_TILE (g_object);
129
133
130
	switch (prop_id)
134
	switch (prop_id)
Lines 141-148 nameplate_tile_get_property (GObject * g_object, guint prop_id, GValue * value, Link Here
141
		g_value_set_object (value, np_tile->subheader);
145
		g_value_set_object (value, np_tile->subheader);
142
		break;
146
		break;
143
	case PROP_NAMEPLATE_TOOLTIP:
147
	case PROP_NAMEPLATE_TOOLTIP:
144
		tooltip = gtk_tooltips_data_get (GTK_WIDGET (np_tile));
148
		tooltip = gtk_widget_get_tooltip_text (GTK_WIDGET (np_tile));
145
		g_value_set_string (value, tooltip ? tooltip->tip_text : NULL);
149
		g_value_set_string (value, tooltip);
150
		g_free (tooltip);
146
		break;
151
		break;
147
152
148
	default:
153
	default:
Lines 229-245 nameplate_tile_set_property (GObject * g_object, guint prop_id, const GValue * v Link Here
229
		break;
234
		break;
230
235
231
	case PROP_NAMEPLATE_TOOLTIP:
236
	case PROP_NAMEPLATE_TOOLTIP:
232
		if (tooltip) {
237
		gtk_widget_set_tooltip_text (GTK_WIDGET (this), tooltip);
233
			if (! priv->tooltips)
234
				priv->tooltips = gtk_tooltips_new ();
235
236
			gtk_tooltips_set_tip (priv->tooltips, GTK_WIDGET(this), tooltip, tooltip);
237
			gtk_tooltips_enable(priv->tooltips);
238
		}
239
		else
240
			if (priv->tooltips)
241
				gtk_tooltips_disable(priv->tooltips);
242
243
		break;
238
		break;
244
239
245
240
(-)a/libslab/tile.c (-3 / +20 lines)
Lines 209-215 tile_finalize (GObject * g_object) Link Here
209
	if (tile->uri)
209
	if (tile->uri)
210
		g_free (tile->uri);
210
		g_free (tile->uri);
211
	if (tile->context_menu)
211
	if (tile->context_menu)
212
		gtk_object_sink (GTK_OBJECT (tile->context_menu));
212
		gtk_widget_destroy (GTK_WIDGET (tile->context_menu));
213
213
214
	g_object_unref (priv->double_click_detector);
214
	g_object_unref (priv->double_click_detector);
215
215
Lines 240-256 tile_get_property (GObject * g_obj, guint prop_id, GValue * value, GParamSpec * Link Here
240
static void
240
static void
241
tile_set_property (GObject * g_obj, guint prop_id, const GValue * value, GParamSpec * param_spec)
241
tile_set_property (GObject * g_obj, guint prop_id, const GValue * value, GParamSpec * param_spec)
242
{
242
{
243
	Tile *tile;
244
	GtkMenu *menu;
245
243
	if (!IS_TILE (g_obj))
246
	if (!IS_TILE (g_obj))
244
		return;
247
		return;
245
248
249
	tile = TILE (g_obj);
250
246
	switch (prop_id)
251
	switch (prop_id)
247
	{
252
	{
248
	case PROP_TILE_URI:
253
	case PROP_TILE_URI:
249
		TILE (g_obj)->uri = g_strdup (g_value_get_string (value));
254
		tile->uri = g_strdup (g_value_get_string (value));
250
		break;
255
		break;
251
256
252
	case PROP_TILE_CONTEXT_MENU:
257
	case PROP_TILE_CONTEXT_MENU:
253
		TILE (g_obj)->context_menu = g_value_get_object (value);
258
		menu = g_value_get_object (value);
259
260
		if (menu == tile->context_menu)
261
			break;
262
263
		if (tile->context_menu)
264
			gtk_menu_detach (tile->context_menu);
265
266
		tile->context_menu = menu;
267
268
		if (tile->context_menu)
269
			gtk_menu_attach_to_widget (tile->context_menu, GTK_WIDGET (tile), NULL);
270
254
		break;
271
		break;
255
272
256
	default:
273
	default:
(-)a/main-menu/src/main-menu-ui.c (+3 lines)
Lines 1001-1006 setup_recently_used_store_monitor (MainMenuUI *this, gboolean is_startup) Link Here
1001
1001
1002
	path = get_recently_used_store_filename ();
1002
	path = get_recently_used_store_filename ();
1003
	file = g_file_new_for_path (path);
1003
	file = g_file_new_for_path (path);
1004
	g_free (path);
1004
1005
1005
	monitor = g_file_monitor_file (file, 0, NULL, NULL);
1006
	monitor = g_file_monitor_file (file, 0, NULL, NULL);
1006
	if (monitor) {
1007
	if (monitor) {
Lines 1011-1016 setup_recently_used_store_monitor (MainMenuUI *this, gboolean is_startup) Link Here
1011
				  this);
1012
				  this);
1012
	}
1013
	}
1013
1014
1015
	g_object_unref (file);
1016
1014
	priv->recently_used_store_monitor = monitor;
1017
	priv->recently_used_store_monitor = monitor;
1015
1018
1016
	if (priv->recently_used_timeout_id != 0)
1019
	if (priv->recently_used_timeout_id != 0)
(-)a/main-menu/src/tile-table.c (-4 / +7 lines)
Lines 30-35 typedef struct { Link Here
30
	BookmarkAgent   *agent;
30
	BookmarkAgent   *agent;
31
31
32
	GList           *tiles;
32
	GList           *tiles;
33
	GtkSizeGroup    *icon_size_group;
33
34
34
	GtkBin         **bins;
35
	GtkBin         **bins;
35
	gint             n_bins;
36
	gint             n_bins;
Lines 119-126 tile_table_reload (TileTable *this) Link Here
119
	GtkWidget     *tile;
120
	GtkWidget     *tile;
120
	gint           n_tiles;
121
	gint           n_tiles;
121
122
122
	GtkSizeGroup *icon_size_group;
123
124
	GList *node;
123
	GList *node;
125
	gint   i;
124
	gint   i;
126
125
Lines 144-150 tile_table_reload (TileTable *this) Link Here
144
143
145
	priv->tiles = NULL;
144
	priv->tiles = NULL;
146
145
147
	icon_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
146
	if (!priv->icon_size_group)
147
		priv->icon_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
148
148
149
	for (node = tiles; node; node = node->next) {
149
	for (node = tiles; node; node = node->next) {
150
		tile = GTK_WIDGET (node->data);
150
		tile = GTK_WIDGET (node->data);
Lines 161-167 tile_table_reload (TileTable *this) Link Here
161
		priv->tiles = g_list_append (priv->tiles, tile);
161
		priv->tiles = g_list_append (priv->tiles, tile);
162
162
163
		if (IS_NAMEPLATE_TILE (tile))
163
		if (IS_NAMEPLATE_TILE (tile))
164
			gtk_size_group_add_widget (icon_size_group, NAMEPLATE_TILE (tile)->image);
164
			gtk_size_group_add_widget (priv->icon_size_group, NAMEPLATE_TILE (tile)->image);
165
	}
165
	}
166
166
167
	g_list_free (tiles);
167
	g_list_free (tiles);
Lines 343-348 finalize (GObject *g_obj) Link Here
343
{
343
{
344
	TileTablePrivate *priv = PRIVATE (g_obj);
344
	TileTablePrivate *priv = PRIVATE (g_obj);
345
345
346
	if (priv->icon_size_group)
347
		g_object_unref (priv->icon_size_group);
348
346
	g_free (priv->bins);
349
	g_free (priv->bins);
347
350
348
	G_OBJECT_CLASS (tile_table_parent_class)->finalize (g_obj);
351
	G_OBJECT_CLASS (tile_table_parent_class)->finalize (g_obj);

Return to bug 402256