From: <sa...@us...> - 2006-09-27 02:29:38
|
Revision: 17382 http://svn.sourceforge.net/gaim/?rev=17382&view=rev Author: sadrul Date: 2006-09-26 19:29:03 -0700 (Tue, 26 Sep 2006) Log Message: ----------- Update the statusbox when a plugin changes the global buddyicon. Make sure the iconboxes show up correctly if a plugin toggles them on/off. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-09-27 02:07:06 UTC (rev 17381) +++ trunk/gtk/gtkstatusbox.c 2006-09-27 02:29:03 UTC (rev 17382) @@ -298,6 +298,8 @@ if (status_box->icon_box != NULL) return; + status_box->icon = gtk_image_new(); + status_box->icon_box = gtk_event_box_new(); if (status_box->account && !gaim_account_get_ui_bool(status_box->account, GAIM_GTK_UI, "use-global-buddyicon", TRUE)) { @@ -309,8 +311,6 @@ { gtk_gaim_status_box_set_buddy_icon(status_box, gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon")); } - status_box->icon = gtk_image_new(); - status_box->icon_box = gtk_event_box_new(); status_box->hand_cursor = gdk_cursor_new (GDK_HAND2); status_box->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR); @@ -352,6 +352,7 @@ g_free(statusbox->buddy_icon_path); + statusbox->icon = NULL; statusbox->icon_box = NULL; statusbox->buddy_icon_path = NULL; statusbox->buddy_icon = NULL; @@ -1087,7 +1088,7 @@ } static void -icon_choose_cb(const char *filename, gpointer data) +buddy_icon_set_cb(const char *filename, gpointer data) { GtkGaimStatusBox *box; @@ -1125,14 +1126,30 @@ } } gtk_gaim_status_box_set_buddy_icon(box, filename); - if (box->account == NULL) - gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", filename); } box->buddy_icon_sel = NULL; } static void +icon_choose_cb(const char *filename, gpointer data) +{ + GtkGaimStatusBox *box = data; + if (box->account == NULL) + /* The pref-connect callback does the actual work */ + gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", filename); + else + buddy_icon_set_cb(filename, data); +} + +static void +update_buddyicon_cb(const char *name, GaimPrefType type, + gconstpointer value, gpointer data) +{ + buddy_icon_set_cb(value, data); +} + +static void gtk_gaim_status_box_init (GtkGaimStatusBox *status_box) { GtkCellRenderer *text_rend; @@ -1234,6 +1251,8 @@ buddy_list_details_pref_changed_cb, status_box); gaim_prefs_connect_callback(status_box, "/gaim/gtk/conversations/spellcheck", spellcheck_prefs_cb, status_box); + gaim_prefs_connect_callback(status_box, "/gaim/gtk/accounts/buddyicon", + update_buddyicon_cb, status_box); } static void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-10-04 02:32:32
|
Revision: 17425 http://svn.sourceforge.net/gaim/?rev=17425&view=rev Author: datallah Date: 2006-10-03 19:32:17 -0700 (Tue, 03 Oct 2006) Log Message: ----------- Oops, I leaked. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-10-03 01:59:32 UTC (rev 17424) +++ trunk/gtk/gtkstatusbox.c 2006-10-04 02:32:17 UTC (rev 17425) @@ -712,7 +712,6 @@ GtkTreeIter iter; GtkGaimStatusBoxItemType type; gpointer data; - const char *name; /* Unset the active item */ gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1); @@ -724,21 +723,27 @@ { gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, TYPE_COLUMN, &type, - TEXT_COLUMN, &name, DATA_COLUMN, &data, -1); if (status_box->token_status_account && gaim_savedstatus_is_transient(saved_status) && type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE && primitive == GPOINTER_TO_INT(data)) { + char *name; const char *acct_status_name = gaim_status_get_name( gaim_account_get_active_status(status_box->token_status_account)); + + gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, + TEXT_COLUMN, &name, -1); + if (!gaim_savedstatus_has_substatuses(saved_status) || !strcmp(name, acct_status_name)) { /* Found! */ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); + g_free(name); break; } + g_free(name); } else if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2006-10-17 08:13:55
|
Revision: 17495 http://svn.sourceforge.net/gaim/?rev=17495&view=rev Author: deryni9 Date: 2006-10-17 01:13:41 -0700 (Tue, 17 Oct 2006) Log Message: ----------- This should fix the statusbox issues that were keeping us from releasing beta 4 (and which were just really annoying). Thakn sadrul for most of this, I just added the if (index == -1) bit. Anyway, the way this works now is that for saved/popular statuses the primitive underlying that status is where the dropdown for the statusbox starts. If we don't like that we can change it but I'm not sure we'll find something better. Also, this might plug a couple leaks, I'm not really sure but it certainly looks right. Up next, the patch to make the docklet use the per-protocol statuses in the top section. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-10-17 05:00:19 UTC (rev 17494) +++ trunk/gtk/gtkstatusbox.c 2006-10-17 08:13:41 UTC (rev 17495) @@ -696,19 +696,16 @@ gtk_widget_set_sensitive(GTK_WIDGET(status_box), FALSE); /* - * If the saved_status is transient, is Available, Away, Invisible - * or Offline, and it does not have an substatuses, then select - * the primitive in the dropdown menu. Otherwise select the - * popular status in the dropdown menu. + * If there is a token-account, then select the primitive from the + * dropdown using a loop. Otherwise select from the default list. */ primitive = gaim_savedstatus_get_type(saved_status); - if (!status_box->token_status_account && gaim_savedstatus_is_transient(saved_status) && - ((primitive == GAIM_STATUS_AVAILABLE) || (primitive == GAIM_STATUS_AWAY) || - (primitive == GAIM_STATUS_INVISIBLE) || (primitive == GAIM_STATUS_OFFLINE)) && - (!gaim_savedstatus_has_substatuses(saved_status))) + if (!status_box->token_status_account) { index = get_statusbox_index(status_box, saved_status); gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index); + if (index == -1) + gtk_gaim_status_box_refresh(status_box); } else { @@ -728,8 +725,7 @@ TYPE_COLUMN, &type, DATA_COLUMN, &data, -1); - if (status_box->token_status_account && gaim_savedstatus_is_transient(saved_status) - && type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE && primitive == GPOINTER_TO_INT(data)) + if (type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE && primitive == GPOINTER_TO_INT(data)) { char *name; const char *acct_status_name = gaim_status_get_name( @@ -738,8 +734,7 @@ gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, TEXT_COLUMN, &name, -1); - if (!gaim_savedstatus_has_substatuses(saved_status) - || !strcmp(name, acct_status_name)) + if (!strcmp(name, acct_status_name)) { /* Found! */ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); @@ -748,13 +743,6 @@ } g_free(name); } - else if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && - (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))) - { - /* Found! */ - gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); - break; - } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(status_box->dropdown_store), &iter)); } @@ -984,6 +972,10 @@ gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf2, _("Away"), NULL, GINT_TO_POINTER(GAIM_STATUS_AWAY)); gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf4, _("Invisible"), NULL, GINT_TO_POINTER(GAIM_STATUS_INVISIBLE)); gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf3, _("Offline"), NULL, GINT_TO_POINTER(GAIM_STATUS_OFFLINE)); + + if (pixbuf2) g_object_unref(G_OBJECT(pixbuf2)); + if (pixbuf3) g_object_unref(G_OBJECT(pixbuf3)); + if (pixbuf4) g_object_unref(G_OBJECT(pixbuf4)); } add_popular_statuses(status_box); @@ -991,6 +983,7 @@ gtk_gaim_status_box_add_separator(GTK_GAIM_STATUS_BOX(status_box)); gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_CUSTOM, pixbuf, _("New..."), NULL, NULL); gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_SAVED, pixbuf, _("Saved..."), NULL, NULL); + if (pixbuf) g_object_unref(G_OBJECT(pixbuf)); gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store)); status_menu_refresh_iter(status_box); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-10-17 19:21:35
|
Revision: 17500 http://svn.sourceforge.net/gaim/?rev=17500&view=rev Author: datallah Date: 2006-10-17 12:21:30 -0700 (Tue, 17 Oct 2006) Log Message: ----------- deryni noticed that the refresh call was redundant Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-10-17 19:01:38 UTC (rev 17499) +++ trunk/gtk/gtkstatusbox.c 2006-10-17 19:21:30 UTC (rev 17500) @@ -227,10 +227,7 @@ if (status_box->account == account) update_to_reflect_account_status(status_box, account, newstatus); else if (status_box->token_status_account == account) - { - gtk_gaim_status_box_refresh(status_box); status_menu_refresh_iter(status_box); - } } static gboolean This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2006-10-17 20:44:27
|
Revision: 17501 http://svn.sourceforge.net/gaim/?rev=17501&view=rev Author: deryni9 Date: 2006-10-17 13:44:05 -0700 (Tue, 17 Oct 2006) Log Message: ----------- This should fix the problem that my last commit introduced. Having the base primitive status of a saved status selected in the dropdown sounded like a pretty good idea, only it broke actually selecting that primitive once the saved status was selected. So any saved status based off of the Away primitive locked you out from being able to choose the Away primitive when that saved status was selected. So go back to selecting nothing for saved statuses. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-10-17 19:21:30 UTC (rev 17500) +++ trunk/gtk/gtkstatusbox.c 2006-10-17 20:44:05 UTC (rev 17501) @@ -689,10 +689,13 @@ primitive = gaim_savedstatus_get_type(saved_status); if (!status_box->token_status_account) { - index = get_statusbox_index(status_box, saved_status); - gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index); - if (index == -1) + if (gaim_savedstatus_is_transient(saved_status)) { + index = get_statusbox_index(status_box, saved_status); + gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), + index); + } else { gtk_gaim_status_box_refresh(status_box); + } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-10-19 22:02:32
|
Revision: 17549 http://svn.sourceforge.net/gaim/?rev=17549&view=rev Author: sadrul Date: 2006-10-19 15:02:25 -0700 (Thu, 19 Oct 2006) Log Message: ----------- Fix bug #1580569 Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-10-19 14:05:30 UTC (rev 17548) +++ trunk/gtk/gtkstatusbox.c 2006-10-19 22:02:25 UTC (rev 17549) @@ -1231,19 +1231,19 @@ } gtk_gaim_status_box_set_buddy_icon(box, filename); } - - box->buddy_icon_sel = NULL; } static void icon_choose_cb(const char *filename, gpointer data) { GtkGaimStatusBox *box = data; - if (box->account == NULL) + if (box->account == NULL && filename) /* The pref-connect callback does the actual work */ gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", filename); else buddy_icon_set_cb(filename, data); + + box->buddy_icon_sel = NULL; } static void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-11-19 17:25:11
|
Revision: 17782 http://svn.sourceforge.net/gaim/?rev=17782&view=rev Author: sadrul Date: 2006-11-19 09:24:56 -0800 (Sun, 19 Nov 2006) Log Message: ----------- Patch #1508458: "Improvements for per-account statusboxes" "If someone changes the status of an account using a per-account status-selector, and the current savedstatus is a transient savedstatus, then the changed status for the account is added as a substatus for the savedstatus. This is useful because a user can create a custom status using the per-account statusboxes in the buddy-list, and then using the 'New...' item from the global selectors, which will automatically populate the different statuses of all the accounts." Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-11-19 07:37:48 UTC (rev 17781) +++ trunk/gtk/gtkstatusbox.c 2006-11-19 17:24:56 UTC (rev 17782) @@ -1888,6 +1888,11 @@ else gaim_account_set_status(status_box->account, id, TRUE, NULL); + + saved_status = gaim_savedstatus_get_current(); + if (gaim_savedstatus_is_transient(saved_status)) + gaim_savedstatus_set_substatus(saved_status, status_box->account, + status_type, message); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-11-21 15:15:33
|
Revision: 17802 http://svn.sourceforge.net/gaim/?rev=17802&view=rev Author: datallah Date: 2006-11-21 07:15:20 -0800 (Tue, 21 Nov 2006) Log Message: ----------- Fix clearing buddy icon for per-account statusboxes. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-11-21 05:34:42 UTC (rev 17801) +++ trunk/gtk/gtkstatusbox.c 2006-11-21 15:15:20 UTC (rev 17802) @@ -82,6 +82,7 @@ static void do_colorshift (GdkPixbuf *dest, GdkPixbuf *src, int shift); static void icon_choose_cb(const char *filename, gpointer data); +static void remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box); static void (*combo_box_size_request)(GtkWidget *widget, GtkRequisition *requisition); static void (*combo_box_size_allocate)(GtkWidget *widget, GtkAllocation *allocation); @@ -230,16 +231,6 @@ status_menu_refresh_iter(status_box); } -static void -remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box) -{ - /* The pref-connect callback does the actual work */ - gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", NULL); - - gtk_widget_destroy(box->icon_box_menu); - box->icon_box_menu = NULL; -} - static gboolean icon_box_press_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) { @@ -1225,12 +1216,9 @@ } static void -buddy_icon_set_cb(const char *filename, gpointer data) +buddy_icon_set_cb(const char *filename, GtkGaimStatusBox *box) { - GtkGaimStatusBox *box; - box = data; - if (box->account) { GaimPlugin *plug = gaim_find_prpl(gaim_account_get_protocol_id(box->account)); if (plug) { @@ -1268,6 +1256,19 @@ } static void +remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box) +{ + if (box->account == NULL) + /* The pref-connect callback does the actual work */ + gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", NULL); + else + buddy_icon_set_cb(NULL, box); + + gtk_widget_destroy(box->icon_box_menu); + box->icon_box_menu = NULL; +} + +static void icon_choose_cb(const char *filename, gpointer data) { GtkGaimStatusBox *box = data; @@ -1276,7 +1277,7 @@ /* The pref-connect callback does the actual work */ gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", filename); else - buddy_icon_set_cb(filename, data); + buddy_icon_set_cb(filename, box); } box->buddy_icon_sel = NULL; @@ -1286,7 +1287,7 @@ update_buddyicon_cb(const char *name, GaimPrefType type, gconstpointer value, gpointer data) { - buddy_icon_set_cb(value, data); + buddy_icon_set_cb(value, (GtkGaimStatusBox*) data); } static void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-01 23:34:41
|
Revision: 17869 http://svn.sourceforge.net/gaim/?rev=17869&view=rev Author: seanegan Date: 2006-12-01 15:34:40 -0800 (Fri, 01 Dec 2006) Log Message: ----------- A few tweaks to new statusbox look and feel. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-01 20:02:32 UTC (rev 17868) +++ trunk/gtk/gtkstatusbox.c 2006-12-01 23:34:40 UTC (rev 17869) @@ -767,8 +767,8 @@ break; } g_free(name); - } - else if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && + + } else if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))) { /* Found! */ @@ -1252,6 +1252,31 @@ } } +popup_grab_on_window (GdkWindow *window, + guint32 activate_time, + gboolean grab_keyboard) +{ + if ((gdk_pointer_grab (window, TRUE, + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_POINTER_MOTION_MASK, + NULL, NULL, activate_time) == 0)) + { + if (!grab_keyboard || + gdk_keyboard_grab (window, TRUE, + activate_time) == 0) + return TRUE; + else + { + gdk_display_pointer_ungrab (gdk_drawable_get_display (window), + activate_time); + return FALSE; + } + } + + return FALSE; +} + + static void gaim_gtk_status_box_popup(GtkGaimStatusBox *box) { @@ -1261,7 +1286,17 @@ gtk_widget_set_size_request (box->popup_window, width, height); gtk_window_move (GTK_WINDOW (box->popup_window), x, y); gtk_widget_show(box->popup_window); + gtk_widget_grab_focus (box->tree_view); + if (!popup_grab_on_window (box->popup_window->window, + GDK_CURRENT_TIME, TRUE)) { + gtk_widget_hide (box->popup_window); + return; + } + gtk_grab_add (box->popup_window); box->popup_in_progress = TRUE; + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (box->toggle_button), + TRUE); + } static void @@ -1270,7 +1305,7 @@ box->popup_in_progress = FALSE; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (box->toggle_button), FALSE); - + gtk_grab_remove (box->popup_window); } @@ -1366,11 +1401,33 @@ treeview_button_release_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *status_box) { GtkTreePath *path = NULL; - int ret = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (status_box->tree_view), + int ret; + GtkWidget *ewidget = gtk_get_event_widget ((GdkEvent *)event); + + if (ewidget != status_box->tree_view) { + if (ewidget == status_box->toggle_button && + !status_box->popup_in_progress && + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (status_box->toggle_button))) { + gaim_gtk_status_box_popdown (status_box); + return TRUE; + } + + /* released outside treeview */ + if (ewidget != status_box->toggle_button) + { + gaim_gtk_status_box_popdown (status_box); + return TRUE; + } + + return FALSE; + } + + ret = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (status_box->tree_view), event->x, event->y, &path, NULL, NULL, NULL); + if (!ret) return TRUE; /* clicked outside window? */ @@ -1524,7 +1581,7 @@ g_signal_connect(G_OBJECT(status_box), "scroll_event", G_CALLBACK(combo_box_scroll_event_cb), NULL); g_signal_connect(G_OBJECT(status_box->imhtml), "scroll_event", G_CALLBACK(imhtml_scroll_event_cb), status_box->imhtml); - g_signal_connect(G_OBJECT(status_box->tree_view), "button_release_event", G_CALLBACK(treeview_button_release_cb), status_box); + g_signal_connect(G_OBJECT(status_box->popup_window), "button_release_event", G_CALLBACK(treeview_button_release_cb), status_box); #if GTK_CHECK_VERSION(2,6,0) gtk_tree_view_set_row_separator_func(GTK_TREE_VIEW(status_box->tree_view), dropdown_store_row_separator_func, NULL, NULL); @@ -1571,7 +1628,7 @@ /* If the gtkimhtml is visible, then add some additional padding */ gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->vbox, &box_req); if (box_req.height > 1) - requisition->height += box_req.height + 3; + requisition->height += box_req.height + border_width; requisition->width = 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-06 00:57:34
|
Revision: 17898 http://svn.sourceforge.net/gaim/?rev=17898&view=rev Author: seanegan Date: 2006-12-05 16:57:19 -0800 (Tue, 05 Dec 2006) Log Message: ----------- force statusbox up to 30px all the time Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-06 00:39:27 UTC (rev 17897) +++ trunk/gtk/gtkstatusbox.c 2006-12-06 00:57:19 UTC (rev 17898) @@ -1622,8 +1622,7 @@ gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->toggle_button, requisition); /* Make this icon the same size as other buddy icons in the list; unless it already wants to be bigger */ - if ( gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) - requisition->height = MAX(requisition->height, 30 + (border_width*2)); + requisition->height = MAX(requisition->height, 30 + (border_width*2)); /* If the gtkimhtml is visible, then add some additional padding */ gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->vbox, &box_req); @@ -1685,8 +1684,7 @@ gtk_widget_size_request(status_box->toggle_button, &req); /* Make this icon the same size as other buddy icons in the list; unless it already wants to be bigger */ - if ( gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) - req.height = MAX(req.height, 30 + (border_width*2)); + req.height = MAX(req.height, 30 + (border_width*2)); box_alc = *allocation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-06 02:15:29
|
Revision: 17900 http://svn.sourceforge.net/gaim/?rev=17900&view=rev Author: seanegan Date: 2006-12-05 18:15:28 -0800 (Tue, 05 Dec 2006) Log Message: ----------- bugfix Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-06 01:29:59 UTC (rev 17899) +++ trunk/gtk/gtkstatusbox.c 2006-12-06 02:15:28 UTC (rev 17900) @@ -1406,7 +1406,7 @@ if (ewidget != status_box->tree_view) { if (ewidget == status_box->toggle_button && - !status_box->popup_in_progress && + status_box->popup_in_progress && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (status_box->toggle_button))) { gaim_gtk_status_box_popdown (status_box); return TRUE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-07 02:55:22
|
Revision: 17904 http://svn.sourceforge.net/gaim/?rev=17904&view=rev Author: sadrul Date: 2006-12-06 18:48:08 -0800 (Wed, 06 Dec 2006) Log Message: ----------- I was getting a scrollbar in the statusbox with only one line of message. This fixes that. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-06 23:05:51 UTC (rev 17903) +++ trunk/gtk/gtkstatusbox.c 2006-12-07 02:48:08 UTC (rev 17904) @@ -1661,7 +1661,7 @@ /* If the gtkimhtml is visible, then add some additional padding */ gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->vbox, &box_req); if (box_req.height > 1) - requisition->height += box_req.height + border_width; + requisition->height += box_req.height + border_width * 2; requisition->width = 1; } @@ -1726,7 +1726,7 @@ box_alc.height = MAX(1, ((allocation->height - req.height) - (border_width*2))); box_alc.x += border_width; box_alc.y += req.height + border_width; - gtk_widget_size_allocate((GTK_GAIM_STATUS_BOX(widget))->vbox, &box_alc); + gtk_widget_size_allocate(status_box->vbox, &box_alc); parent_alc = *allocation; parent_alc.height = MAX(1,req.height - (border_width *2)); @@ -2201,6 +2201,7 @@ wrapped_lines = 1; gtk_text_buffer_get_start_iter(buffer, &iter); + gtk_text_view_get_iter_location(GTK_TEXT_VIEW(status_box->imhtml), &iter, &oneline); while (gtk_text_view_forward_display_line(GTK_TEXT_VIEW(status_box->imhtml), &iter)) wrapped_lines++; @@ -2210,9 +2211,6 @@ lines = MIN(lines, 4); wrapped_lines = MIN(wrapped_lines, 4); - gtk_text_buffer_get_start_iter(buffer, &iter); - gtk_text_view_get_iter_location(GTK_TEXT_VIEW(status_box->imhtml), &iter, &oneline); - pad_top = gtk_text_view_get_pixels_above_lines(GTK_TEXT_VIEW(status_box->imhtml)); pad_bottom = gtk_text_view_get_pixels_below_lines(GTK_TEXT_VIEW(status_box->imhtml)); pad_inside = gtk_text_view_get_pixels_inside_wrap(GTK_TEXT_VIEW(status_box->imhtml)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-07 03:48:05
|
Revision: 17906 http://svn.sourceforge.net/gaim/?rev=17906&view=rev Author: sadrul Date: 2006-12-06 19:40:27 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Fix the compile warnings. Make sure the popup has the right item selected. Fix a few issues when the statusbox was not being updated properly. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-07 03:37:13 UTC (rev 17905) +++ trunk/gtk/gtkstatusbox.c 2006-12-07 03:40:27 UTC (rev 17906) @@ -202,7 +202,7 @@ path = gtk_tree_path_new_from_indices(status_no, -1); if (status_box->active_row) gtk_tree_row_reference_free(status_box->active_row); - status_box->active_row = gtk_tree_row_reference_new(status_box->dropdown_store, path); + status_box->active_row = gtk_tree_row_reference_new(GTK_TREE_MODEL(status_box->dropdown_store), path); gtk_tree_path_free(path); message = gaim_status_get_attr_string(newstatus, "message"); @@ -692,6 +692,7 @@ GaimStatusPrimitive primitive; gint index; const char *message; + GtkTreePath *path = NULL; /* this function is inappropriate for ones with accounts */ if (status_box->account) @@ -715,14 +716,8 @@ (primitive == GAIM_STATUS_INVISIBLE) || (primitive == GAIM_STATUS_OFFLINE)) && (!gaim_savedstatus_has_substatuses(saved_status))) { - GtkTreePath *path; index = get_statusbox_index(status_box, saved_status); path = gtk_tree_path_new_from_indices(index, -1); - if (status_box->active_row) - gtk_tree_row_reference_free(status_box->active_row); - status_box->active_row = gtk_tree_row_reference_new(status_box->dropdown_store, path); - gtk_tree_path_free(path); - } else { @@ -730,11 +725,6 @@ GtkGaimStatusBoxItemType type; gpointer data; - /* Unset the active item */ - if (status_box->active_row) - gtk_tree_row_reference_free(status_box->active_row); - status_box->active_row = NULL; - /* If this saved status is in the list store, then set it as the active item */ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(status_box->dropdown_store), &iter)) { @@ -761,8 +751,7 @@ || !strcmp(name, acct_status_name)) { /* Found! */ - // gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); - + path = gtk_tree_model_get_path(GTK_TREE_MODEL(status_box->dropdown_store), &iter); g_free(name); break; } @@ -772,7 +761,7 @@ (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))) { /* Found! */ - // gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter); + path = gtk_tree_model_get_path(GTK_TREE_MODEL(status_box->dropdown_store), &iter); break; } } @@ -780,6 +769,15 @@ } } + if (status_box->active_row) + gtk_tree_row_reference_free(status_box->active_row); + if (path) { /* path should never be NULL */ + status_box->active_row = gtk_tree_row_reference_new(GTK_TREE_MODEL(status_box->dropdown_store), path); + gaim_debug_fatal("XXXX", "%s\n", gtk_tree_path_to_string(path)); + gtk_tree_path_free(path); + } else + status_box->active_row = NULL; + message = gaim_savedstatus_get_message(saved_status); if (!gaim_savedstatus_is_transient(saved_status) || !message || !*message) { @@ -1006,13 +1004,14 @@ if (pixbuf) g_object_unref(G_OBJECT(pixbuf)); status_menu_refresh_iter(status_box); + gtk_gaim_status_box_refresh(status_box); } else { add_account_statuses(status_box, status_box->account); update_to_reflect_account_status(status_box, status_box->account, gaim_account_get_active_status(status_box->account)); } - gtk_tree_view_set_model(GTK_TREE_VIEW(status_box->tree_view), status_box->dropdown_store); + gtk_tree_view_set_model(GTK_TREE_VIEW(status_box->tree_view), GTK_TREE_MODEL(status_box->dropdown_store)); gtk_tree_view_set_search_column(GTK_TREE_VIEW(status_box->tree_view), TEXT_COLUMN); } @@ -1053,8 +1052,10 @@ if (status_box->account != NULL) update_to_reflect_account_status(status_box, status_box->account, gaim_account_get_active_status(status_box->account)); - else + else { status_menu_refresh_iter(status_box); + gtk_gaim_status_box_refresh(status_box); + } return TRUE; } @@ -1253,6 +1254,7 @@ } } +static gboolean popup_grab_on_window (GdkWindow *window, guint32 activate_time, gboolean grab_keyboard) @@ -1298,6 +1300,12 @@ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (box->toggle_button), TRUE); + if (box->active_row) { + GtkTreePath *path = gtk_tree_row_reference_get_path(box->active_row); + GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (box->tree_view)); + gtk_tree_selection_unselect_all(sel); + gtk_tree_selection_select_path(sel, path); + } } static void @@ -1552,7 +1560,7 @@ gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (status_box->tree_view), TRUE); gtk_tree_view_set_model (GTK_TREE_VIEW (status_box->tree_view), - status_box->dropdown_store); + GTK_TREE_MODEL(status_box->dropdown_store)); status_box->column = gtk_tree_view_column_new (); gtk_tree_view_append_column (GTK_TREE_VIEW (status_box->tree_view), status_box->column); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-07 04:11:16
|
Revision: 17907 http://svn.sourceforge.net/gaim/?rev=17907&view=rev Author: sadrul Date: 2006-12-06 20:04:11 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Mostly whitespace cleanups. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-07 03:40:27 UTC (rev 17906) +++ trunk/gtk/gtkstatusbox.c 2006-12-07 04:04:11 UTC (rev 17907) @@ -773,7 +773,6 @@ gtk_tree_row_reference_free(status_box->active_row); if (path) { /* path should never be NULL */ status_box->active_row = gtk_tree_row_reference_new(GTK_TREE_MODEL(status_box->dropdown_store), path); - gaim_debug_fatal("XXXX", "%s\n", gtk_tree_path_to_string(path)); gtk_tree_path_free(path); } else status_box->active_row = NULL; @@ -1519,57 +1518,56 @@ text_rend = gtk_cell_renderer_text_new(); icon_rend = gtk_cell_renderer_pixbuf_new(); - - status_box->popup_window = gtk_window_new (GTK_WINDOW_POPUP); + status_box->popup_window = gtk_window_new (GTK_WINDOW_POPUP); - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (status_box)); - if (GTK_IS_WINDOW (toplevel)) { - gtk_window_set_transient_for (GTK_WINDOW (status_box->popup_window), - GTK_WINDOW (toplevel)); - } + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (status_box)); + if (GTK_IS_WINDOW (toplevel)) { + gtk_window_set_transient_for (GTK_WINDOW (status_box->popup_window), + GTK_WINDOW (toplevel)); + } - gtk_window_set_resizable (GTK_WINDOW (status_box->popup_window), FALSE); - gtk_window_set_screen (GTK_WINDOW (status_box->popup_window), - gtk_widget_get_screen (GTK_WIDGET (status_box))); - status_box->popup_frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (status_box->popup_frame), - GTK_SHADOW_ETCHED_IN); - gtk_container_add (GTK_CONTAINER (status_box->popup_window), - status_box->popup_frame); + gtk_window_set_resizable (GTK_WINDOW (status_box->popup_window), FALSE); + gtk_window_set_screen (GTK_WINDOW (status_box->popup_window), + gtk_widget_get_screen (GTK_WIDGET (status_box))); + status_box->popup_frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (status_box->popup_frame), + GTK_SHADOW_ETCHED_IN); + gtk_container_add (GTK_CONTAINER (status_box->popup_window), + status_box->popup_frame); - gtk_widget_show (status_box->popup_frame); + gtk_widget_show (status_box->popup_frame); - status_box->scrolled_window = gtk_scrolled_window_new (NULL, NULL); - - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (status_box->scrolled_window), - GTK_POLICY_NEVER, - GTK_POLICY_NEVER); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (status_box->scrolled_window), - GTK_SHADOW_NONE); + status_box->scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_show (status_box->scrolled_window); - - gtk_container_add (GTK_CONTAINER (status_box->popup_frame), - status_box->scrolled_window); - - status_box->tree_view = gtk_tree_view_new (); - sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (status_box->tree_view)); - gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE); - gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (status_box->tree_view), - FALSE); - gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (status_box->tree_view), - TRUE); - gtk_tree_view_set_model (GTK_TREE_VIEW (status_box->tree_view), - GTK_TREE_MODEL(status_box->dropdown_store)); - status_box->column = gtk_tree_view_column_new (); - gtk_tree_view_append_column (GTK_TREE_VIEW (status_box->tree_view), - status_box->column); - gtk_tree_view_column_pack_start(status_box->column, icon_rend, FALSE); - gtk_tree_view_column_pack_start(status_box->column, text_rend, TRUE); - gtk_tree_view_column_set_attributes(status_box->column, icon_rend, "pixbuf", ICON_COLUMN, NULL); - gtk_tree_view_column_set_attributes(status_box->column, text_rend, "markup", TEXT_COLUMN, NULL); - gtk_container_add(GTK_CONTAINER(status_box->scrolled_window), status_box->tree_view); - gtk_widget_show(status_box->tree_view); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (status_box->scrolled_window), + GTK_POLICY_NEVER, + GTK_POLICY_NEVER); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (status_box->scrolled_window), + GTK_SHADOW_NONE); + + gtk_widget_show (status_box->scrolled_window); + + gtk_container_add (GTK_CONTAINER (status_box->popup_frame), + status_box->scrolled_window); + + status_box->tree_view = gtk_tree_view_new (); + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (status_box->tree_view)); + gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE); + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (status_box->tree_view), + FALSE); + gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (status_box->tree_view), + TRUE); + gtk_tree_view_set_model (GTK_TREE_VIEW (status_box->tree_view), + GTK_TREE_MODEL(status_box->dropdown_store)); + status_box->column = gtk_tree_view_column_new (); + gtk_tree_view_append_column (GTK_TREE_VIEW (status_box->tree_view), + status_box->column); + gtk_tree_view_column_pack_start(status_box->column, icon_rend, FALSE); + gtk_tree_view_column_pack_start(status_box->column, text_rend, TRUE); + gtk_tree_view_column_set_attributes(status_box->column, icon_rend, "pixbuf", ICON_COLUMN, NULL); + gtk_tree_view_column_set_attributes(status_box->column, text_rend, "markup", TEXT_COLUMN, NULL); + gtk_container_add(GTK_CONTAINER(status_box->scrolled_window), status_box->tree_view); + gtk_widget_show(status_box->tree_view); gtk_tree_view_set_search_column(GTK_TREE_VIEW(status_box->tree_view), TEXT_COLUMN); gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(status_box->tree_view), gaim_gtk_tree_view_search_equal_func, NULL, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-10 09:02:49
|
Revision: 17940 http://svn.sourceforge.net/gaim/?rev=17940&view=rev Author: sadrul Date: 2006-12-10 01:02:47 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Make the per-account statusboxes work. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-10 08:29:03 UTC (rev 17939) +++ trunk/gtk/gtkstatusbox.c 2006-12-10 09:02:47 UTC (rev 17940) @@ -764,8 +764,7 @@ path = gtk_tree_model_get_path(GTK_TREE_MODEL(status_box->dropdown_store), &iter); break; } - } - while (gtk_tree_model_iter_next(GTK_TREE_MODEL(status_box->dropdown_store), &iter)); + } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(status_box->dropdown_store), &iter)); } } @@ -2154,7 +2153,7 @@ status = gaim_account_get_active_status(status_box->account); - g_object_get(G_OBJECT(status_box), "active", &active, NULL); + active = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(status_box), "active")); status_type = find_status_type_by_index(status_box->account, active); id = gaim_status_type_get_id(status_type); @@ -2250,11 +2249,14 @@ GtkGaimStatusBoxItemType type; gpointer data; GList *accounts = NULL, *node; + int active; if (!gtk_tree_model_get_iter (GTK_TREE_MODEL(status_box->dropdown_store), &iter, path)) return; + active = gtk_tree_path_get_indices(path)[0]; gtk_tree_path_free(path); + g_object_set_data(G_OBJECT(status_box), "active", GINT_TO_POINTER(active)); gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, TYPE_COLUMN, &type, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-10 22:01:28
|
Revision: 17948 http://svn.sourceforge.net/gaim/?rev=17948&view=rev Author: sadrul Date: 2006-12-10 14:01:22 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Unleak Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-10 14:45:27 UTC (rev 17947) +++ trunk/gtk/gtkstatusbox.c 2006-12-10 22:01:22 UTC (rev 17948) @@ -1301,8 +1301,8 @@ if (box->active_row) { GtkTreePath *path = gtk_tree_row_reference_get_path(box->active_row); GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (box->tree_view)); - gtk_tree_selection_unselect_all(sel); gtk_tree_selection_select_path(sel, path); + gtk_tree_path_free(path); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-14 05:14:23
|
Revision: 17995 http://svn.sourceforge.net/gaim/?rev=17995&view=rev Author: datallah Date: 2006-12-13 21:14:22 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Fix the 'Typing' and 'Connecting' icons to be the right size Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-14 05:02:08 UTC (rev 17994) +++ trunk/gtk/gtkstatusbox.c 2006-12-14 05:14:22 UTC (rev 17995) @@ -1086,7 +1086,7 @@ GtkIconSize icon_size; g_object_set(G_OBJECT(status_box->icon_rend), "xpad", 3, NULL); - icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL_TWO_LINE); + icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL); if (status_box->connecting_pixbufs[0] != NULL) gdk_pixbuf_unref(status_box->connecting_pixbufs[0]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-27 15:01:41
|
Revision: 18063 http://svn.sourceforge.net/gaim/?rev=18063&view=rev Author: sadrul Date: 2006-12-27 07:01:39 -0800 (Wed, 27 Dec 2006) Log Message: ----------- Make sure the selected item in the dropdown also has the keyboard focus. Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-27 13:34:33 UTC (rev 18062) +++ trunk/gtk/gtkstatusbox.c 2006-12-27 15:01:39 UTC (rev 18063) @@ -1309,8 +1309,7 @@ if (box->active_row) { GtkTreePath *path = gtk_tree_row_reference_get_path(box->active_row); - GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (box->tree_view)); - gtk_tree_selection_select_path(sel, path); + gtk_tree_view_set_cursor(GTK_TREE_VIEW(box->tree_view), path, NULL, FALSE); gtk_tree_path_free(path); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |