← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~linuxdcpp-team/linuxdcpp/trunk] Rev 376: Implement open favorite users on startup and favorite users main window menu item.

 

------------------------------------------------------------
revno: 376
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-07-26 23:26:37 -0500
message:
  Implement open favorite users on startup and favorite users main window menu item.
modified:
  glade/mainwindow.glade
  linux/mainwindow.cc
  linux/settingsdialog.cc


--
lp:linuxdcpp
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk

Your team LinuxDC++ Team is subscribed to branch lp:linuxdcpp.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk/+edit-subscription
=== modified file 'glade/mainwindow.glade'
--- glade/mainwindow.glade	2010-05-22 14:23:56 +0000
+++ glade/mainwindow.glade	2010-07-27 04:26:37 +0000
@@ -152,11 +152,18 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkMenuItem" id="favoriteUsersMenuItem">
+                      <widget class="GtkImageMenuItem" id="favoriteUsersMenuItem">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">Favorite Users</property>
                         <property name="use_underline">True</property>
                         <accelerator key="U" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="favoriteUsersMenuImage">
+                            <property name="visible">True</property>
+                            <property name="stock">linuxdcpp-favorite-users</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                     <child>

=== modified file 'linux/mainwindow.cc'
--- linux/mainwindow.cc	2010-05-30 03:15:23 +0000
+++ linux/mainwindow.cc	2010-07-27 04:26:37 +0000
@@ -98,9 +98,6 @@
 	// Set all windows to the default icon
 	gtk_window_set_default_icon_name(g_get_prgname());
 
-	// Disable un-implemented menu items.
-	gtk_widget_set_sensitive(getWidget("favoriteUsersMenuItem"), FALSE);
-
 	// All notebooks created in glade need one page.
 	// In our case, this is just a placeholder, so we remove it.
 	gtk_notebook_remove_page(GTK_NOTEBOOK(getWidget("book")), -1);
@@ -132,6 +129,7 @@
 	g_signal_connect(getWidget("closeMenuItem"), "activate", G_CALLBACK(onCloseClicked_gui), (gpointer)this);
 	g_signal_connect(getWidget("exitMenuItem"), "activate", G_CALLBACK(onQuitClicked_gui), (gpointer)this);
 	g_signal_connect(getWidget("favoriteHubsMenuItem"), "activate", G_CALLBACK(onFavoriteHubsClicked_gui), (gpointer)this);
+	g_signal_connect(getWidget("favoriteUsersMenuItem"), "activate", G_CALLBACK(onFavoriteUsersClicked_gui), (gpointer)this);
 	g_signal_connect(getWidget("publicHubsMenuItem"), "activate", G_CALLBACK(onPublicHubsClicked_gui), (gpointer)this);
 	g_signal_connect(getWidget("indexingProgressMenuItem"), "activate", G_CALLBACK(onHashClicked_gui), (gpointer)this);
 	g_signal_connect(getWidget("searchMenuItem"), "activate", G_CALLBACK(onSearchClicked_gui), (gpointer)this);
@@ -309,6 +307,8 @@
 		showDownloadQueue_gui();
 	if (BOOLSETTING(OPEN_FAVORITE_HUBS))
 		showFavoriteHubs_gui();
+	if (BOOLSETTING(OPEN_FAVORITE_USERS))
+		showFavoriteUsers_gui();
 	if (BOOLSETTING(OPEN_FINISHED_DOWNLOADS))
 		showFinishedDownloads_gui();
 	if (BOOLSETTING(OPEN_FINISHED_UPLOADS))
@@ -1295,7 +1295,7 @@
 void MainWindow::createIPCPipe()
 {
 	const string pipepath = WulforUtil::getPipePath();
-	dcdebug("MainWindow::MainWindow: Pipepath %s\n", pipepath.c_str());
+	dcdebug("MainWindow::createIPCPipe(): Pipepath %s\n", pipepath.c_str());
 
 	int status = mkfifo(pipepath.c_str(), S_IRWXU); 
 

=== modified file 'linux/settingsdialog.cc'
--- linux/settingsdialog.cc	2010-02-28 07:47:28 +0000
+++ linux/settingsdialog.cc	2010-07-27 04:26:37 +0000
@@ -600,8 +600,7 @@
 		addOption_gui(windowStore1, _("Download Queue"), SettingsManager::OPEN_QUEUE);
 		addOption_gui(windowStore1, _("Finished Downloads"), SettingsManager::OPEN_FINISHED_DOWNLOADS);
 		addOption_gui(windowStore1, _("Finished Uploads"), SettingsManager::OPEN_FINISHED_UPLOADS);
-		/// @todo: Uncomment when implemented
-		//addOption_gui(windowStore1, _("Favorite Users"), SettingsManager::OPEN_FAVORITE_USERS);
+		addOption_gui(windowStore1, _("Favorite Users"), SettingsManager::OPEN_FAVORITE_USERS);
 
 		// Window options
 		createOptionsView_gui(windowView2, windowStore2, "windowsOptionsTreeView");